using MicroMsgBackground.Common.Utils;
using System;
namespace MicroMsgBackground.Network
{
	public class OnCallback
	{
		public static void onSuccess(SessionPack sessionPack)
		{
			sessionPack.mCacheBodyBuffer = null;
			sessionPack.onSuccess();
		}
		public static void onError(SessionPack sessionPack, PackResult packResult_0)
		{
			sessionPack.mCacheBodyBuffer = null;
			sessionPack.mResponseBuffer = null;
			sessionPack.onError(packResult_0);
		}
		public static void onAllError(PackResult packResult_0)
		{
			Log.smethod_1("Network", "onAllError");
			SessionPackMgr.cleanAllTimeoutPoint(3);
			SessionPackMgr.markAllToNotSended(3);
			for (SessionPack firstNotSended = SessionPackMgr.getFirstNotSended(); firstNotSended != null; firstNotSended = SessionPackMgr.getFirstNotSended())
			{
				firstNotSended.mSendStatus = 6;
				OnCallback.onError(firstNotSended, packResult_0);
			}
		}
	}
}
